/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entidades.EntidadesAutores;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 *
 * @author LUIGI
 */
@Entity
@Table(name = "lineainvestigacion")
@NamedQueries({
    @NamedQuery(name = "Lineainvestigacion.findAll", query = "SELECT l FROM Lineainvestigacion l"),
    @NamedQuery(name = "Lineainvestigacion.findByIdLineaInvestigacion", query = "SELECT l FROM Lineainvestigacion l WHERE l.idLineaInvestigacion = :idLineaInvestigacion"),
    @NamedQuery(name = "Lineainvestigacion.findByNombreLinea", query = "SELECT l FROM Lineainvestigacion l WHERE l.nombreLinea = :nombreLinea")})
public class Lineainvestigacion implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "IdLineaInvestigacion")
    private Integer idLineaInvestigacion;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 50)
    @Column(name = "NombreLinea")
    private String nombreLinea;

    public Lineainvestigacion() {
    }

    public Lineainvestigacion(Integer idLineaInvestigacion) {
        this.idLineaInvestigacion = idLineaInvestigacion;
    }

    public Lineainvestigacion(Integer idLineaInvestigacion, String nombreLinea) {
        this.idLineaInvestigacion = idLineaInvestigacion;
        this.nombreLinea = nombreLinea;
    }

    public Integer getIdLineaInvestigacion() {
        return idLineaInvestigacion;
    }

    public void setIdLineaInvestigacion(Integer idLineaInvestigacion) {
        this.idLineaInvestigacion = idLineaInvestigacion;
    }

    public String getNombreLinea() {
        return nombreLinea;
    }

    public void setNombreLinea(String nombreLinea) {
        this.nombreLinea = nombreLinea;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idLineaInvestigacion != null ? idLineaInvestigacion.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Lineainvestigacion)) {
            return false;
        }
        Lineainvestigacion other = (Lineainvestigacion) object;
        if ((this.idLineaInvestigacion == null && other.idLineaInvestigacion != null) || (this.idLineaInvestigacion != null && !this.idLineaInvestigacion.equals(other.idLineaInvestigacion))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entidades.EntidadesAutores.Lineainvestigacion[ idLineaInvestigacion=" + idLineaInvestigacion + " ]";
    }
    
}
